# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-plasma
pkgname=plasma-welcome
pkgver=5.27.10
pkgrel=0
pkgdesc="A friendly onboarding wizard for Plasma"
# armhf blocked by qt5-qtdeclarative
# ppc64le, s390x and riscv64 blocked by qt5-qtwebengine -> kaccounts-integration
arch="all !armhf !ppc64le !s390x !riscv64"
url="https://kde.org/plasma-desktop/"
license="GPL-2.0-or-later"
depends="kirigami2"
makedepends="
	extra-cmake-modules
	kaccounts-integration-dev
	kconfigwidgets5-dev
	kcoreaddons5-dev
	kdbusaddons5-dev
	kdeclarative5-dev
	ki18n5-dev
	kio5-dev
	kirigami2-dev
	knewstuff5-dev
	knotifications5-dev
	kservice5-dev
	kuserfeedback-dev
	kwindowsystem5-dev
	plasma-framework5-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qtquickcontrols2-dev
	qt5-qtsvg-dev
	samurai
	"

case "$pkgver" in
	*.90*) _rel=unstable;;
	*) _rel=stable;;
esac
_repo_url="https://invent.kde.org/plasma/plasma-welcome.git"
source="https://download.kde.org/$_rel/plasma/$pkgver/plasma-welcome-$pkgver.tar.xz"
subpackages="$pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
94c55d7a3298f86565f239252b0f6827d347f1e6d99055946c11e0b0dfb23227820c07b45edda59a8080ff6a1c72ff0884dd0e38a728ae84d21943e14df3fd31  plasma-welcome-5.27.10.tar.xz
"
